import React from 'react';
import {Navigate} from "react-router"
// import XJDDiscover from "@/pages/discover";
// import XJDMine from "@/pages/mine";
// import XJDFriend from "@/pages/friend";

// import XJDArtist from "@/pages/discover/c-pages/artist";
// import XJDAlbum from "@/pages/discover/c-pages/album";
// import XJDDjradio from "@/pages/discover/c-pages/djradio";
// import XJDRanking from "@/pages/discover/c-pages/ranking";
// import XJDSongs from "@/pages/discover/c-pages/songs";
// import XJDRecommend from "@/pages/discover/c-pages/recommend";
// import XJDPlayer from "../pages/player"


const XJDDiscover=React.lazy(_=> import("@/pages/discover"))
const XJDMine=React.lazy(_=> import("@/pages/mine"))
const XJDFriend=React.lazy(_=> import("@/pages/friend"))

const XJDArtist=React.lazy(_=> import("@/pages/discover/c-pages/artist"))
const XJDAlbum=React.lazy(_=> import("@/pages/discover/c-pages/album"))
const XJDDjradio=React.lazy(_=> import("@/pages/discover/c-pages/djradio"))
const XJDRanking=React.lazy(_=> import("@/pages/discover/c-pages/ranking"))
const XJDSongs=React.lazy(_=> import("@/pages/discover/c-pages/songs"))
const XJDRecommend=React.lazy(_=> import("@/pages/discover/c-pages/recommend"))
const XJDPlayer=React.lazy(_=> import("../pages/player"))



// const  XJDDiscover =React.lazy(()=>import("@/pages/mine"))
// const  XJDMine =React.lazy(()=>import("@/pages/friend"))
// const  XJDFriend =React.lazy(()=>import("@/pages/friend"))
// const  XJDArtist =React.lazy(()=>import("@/pages/discover/artist"))
// const  XJDAlbum =React.lazy(()=>import("@/pages/discover/album"))
// const  XJDDjradio =React.lazy(()=>import("@/pages/discover/djradio"))
// const  XJDRanking =React.lazy(()=>import("@/pages/discover/ranking"))
// const  XJDSongs =React.lazy(()=>import("@/pages/discover/songs"))
// const  XJDRecommend =React.lazy(()=>import("@/pages/discover/recommend"))
const routes = [
  {
    path: "/",
    // exact: true,
    element:<Navigate to="/discover"/>
    // element:<XJDDiscover/>,
  },
  // {
  //   path: "/discover",
  //   element:<XJDDiscover/>,
  // },
  {
    path: "/discover",
    // exact:true,
    element:<XJDDiscover/>,
    children:[
      {
        path:"",
        element:<Navigate to="/discover/recommend" />
      },
      {
        path:"recommend",
        element:<XJDRecommend/>
      }, 
      {
        path:"ranking",
        element:<XJDRanking/>
      },
      {
        path:"songs",
        element:<XJDSongs/>,
      },
      {
        path:"djradio",
        element:<XJDDjradio/>,
      },
      {
        path:"album",
        element:<XJDAlbum/>,
      },
      {
        path:"artist",
        element:<XJDArtist/>,
      },
      {
        path:"player",
        element:<XJDPlayer/>
      }
    ]
  },
  {
    path: "/mine",
    element:<XJDMine/>,
  },
  {
    path: "/friend",
    element: <XJDFriend/>,
  },
];
export default routes;
